# _*_ coding ：utf-8 _*_
# @Time : 2023/9/21 8:53
# @Author : 计科1914-02-陈鸿宇
# @File : 3.6
# @Project : ttkbootstrap.py
import random

list = ["红球", "红球", "红球",
        "黄球", "黄球", "黄球",
        "绿球", "绿球", "绿球", "绿球", "绿球", "绿球"]


def ran(num):
    for i in range(1, int(num) + 1):
        l1 = random.sample(list, 8)
        print("第%d次选择:红球%d个,黄球%d个,绿球%d个" % (i, l1.count("红球"), l1.count("黄球"), l1.count("绿球")))


if __name__ == '__main__':
    ran(input("请问您想随机几次:"))
